package com.ptswitch.material.components.row;

import org.apache.tapestry5.ComponentResources;
import org.apache.tapestry5.annotations.Parameter;
import org.apache.tapestry5.annotations.Property;
import org.apache.tapestry5.ioc.annotations.Inject;
import org.hxzon.tapestry5.components.base.CustomGridEx;

import com.ptswitch.material.model.contract.Contract;
import com.ptswitch.material.model.material.Material;

public class MaterialForContractRow extends CustomGridEx {
    @Parameter
    @Property
    private Contract contract;

    @Property
    private Material material;

    @Inject
    private ComponentResources resources;

    //for test
    public String getSelectItemLink() {
        //here,selectItem is a event name,not a component name!
        //see AddItems
        return resources.createEventLink("selectItem").toAbsoluteURI();
    }

}
